package com.example.demo.entity;

import lombok.Data;

import java.time.LocalDateTime;

@Data // Lombok注解，自动生成getter/setter
public class ChatMessage {
    private Long id;
    private String sender; // "user" 或 "agent" 或 "system"
    private String content;
    private String userId; // 用户唯一标识
    private String type; // "text" 或 "audio" 或 "photo"
    private LocalDateTime timeStamp = LocalDateTime.now();

    public ChatMessage(String sender, String content) {
        this.sender = sender;
        this.content = content;
    }
}
